﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;

/******************************************************
FileName: 系统预警子系统接口
Copyright  (c)  2008-河北鼎新公司技术开发部
Writer: 杨秀东
create Date: 2008-12-19
******************************************************/

namespace Dx.SysAdmin
{
    /// <summary>
    ///模块编号：YJ001
    ///功能描述：系统预警所有功能
    ///创 建 人：杨秀东
    ///创建日期：2008-12-19
    /// </summary>
    public interface ISysWarm
    {
        /// <summary>
        /// 添加系统预警
        /// </summary>
        /// <param name="warmInfo">预警实体</param>
        /// <returns>-1失败或重复，0异常，1成功</returns>
        int AddSysWarm(SysWarmInfo warmInfo);

        /// <summary>
        /// 删除一个预警数据
        /// </summary>
        /// <param name="id">预警编号</param>
        /// <returns></returns>
        bool DelSysWarm(string id);

        /// <summary>
        /// 编辑预警数据
        /// </summary>
        /// <param name="warmInfo">预警实体</param>
        /// <returns></returns>
        bool EditSysWarm(SysWarmInfo warmInfo);

        /// <summary>
        /// 获取全部预警数据
        /// </summary>
        /// <returns></returns>
        DataSet GetAllSysWarm();

        /// <summary>
        /// 只获取开放的预警数据
        /// </summary>
        /// <returns></returns>
        DataSet GetOpenSysWarm();

        /// <summary>
        /// 预警优先级降低
        /// </summary>
        /// <param name="id">预警编号</param>
        /// <returns>true成功，false失败</returns>
        bool SetSysWarmDesc(string id);

        /// <summary>
        /// 预警优先级提高
        /// </summary>
        /// <param name="id">预警编号</param>
        /// <returns>true成功，false失败</returns>
        bool SetSysWarmAsc(string id);

        /// <summary>
        /// 根据预警优先级得到某个预警值
        /// </summary>
        /// <returns>string OR null</returns>
        string GetOneWarmValue();

        /// <summary>
        /// 开通/禁用预警
        /// </summary>
        /// <param name="id">预警编号</param>
        /// <returns>true成功，false失败</returns>
        bool EnabledSysWarm(string id);

        /// <summary>
        /// 获取某个预警业务实体
        /// </summary>
        /// <param name="id">预警编号</param>
        /// <returns>SysWarmInfo</returns>
        SysWarmInfo GetOneWarmInfo(string id);
    }
}
